package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PictureMapper;
import com.ruoyi.system.domain.Picture;
import com.ruoyi.system.service.IPictureService;

/**
 * 图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-05-26
 */
@Service
public class PictureServiceImpl implements IPictureService 
{
    @Autowired
    private PictureMapper pictureMapper;

    /**
     * 查询图片
     * 
     * @param pictureId 图片ID
     * @return 图片
     */
    @Override
    public Picture selectPictureById(Long pictureId)
    {
        return pictureMapper.selectPictureById(pictureId);
    }

    /**
     * 查询图片列表
     * 
     * @param picture 图片
     * @return 图片
     */
    @Override
    public List<Picture> selectPictureList(Picture picture)
    {
        return pictureMapper.selectPictureList(picture);
    }

    /**
     * 新增图片
     * 
     * @param picture 图片
     * @return 结果
     */
    @Override
    public int insertPicture(Picture picture)
    {
        return pictureMapper.insertPicture(picture);
    }

    /**
     * 修改图片
     * 
     * @param picture 图片
     * @return 结果
     */
    @Override
    public int updatePicture(Picture picture)
    {
        return pictureMapper.updatePicture(picture);
    }

    /**
     * 批量删除图片
     * 
     * @param pictureIds 需要删除的图片ID
     * @return 结果
     */
    @Override
    public int deletePictureByIds(Long[] pictureIds)
    {
        return pictureMapper.deletePictureByIds(pictureIds);
    }

    /**
     * 删除图片信息
     * 
     * @param pictureId 图片ID
     * @return 结果
     */
    @Override
    public int deletePictureById(Long pictureId)
    {
        return pictureMapper.deletePictureById(pictureId);
    }
}
